export function load_image (url) {
    return new Promise((fulfil, reject) => {
        const img = new Image()
        img.onerror = reject
        img.onload = () => fulfil(img)
        img.src = url
    })
}